package com.coda.mapper;

import com.coda.annotation.AutoFill;
import com.coda.entity.Auth;
import com.coda.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AuthMapper {
    /**
     * 添加权限
     * @param auth
     */
    @AutoFill(OperationType.INSERT)
    void addAuth(Auth auth);

    /**
     * 根据权限名查询权限
     * @param authName
     * @return
     */
    @Select("select * from auth_info where auth_name = #{authName}")
    Auth getAuthByName(String authName);
}
